using ChikovMF.Application.Features.Tags.EditTag;
using Shouldly;

namespace ChikovMF.Tests.Tags.Queries;

public class EditTagTest : TestQueryBase
{
    [Fact]
    public async Task EditTagTest_Success()
    {
        var handler = new EditTagQueryHandler(_context, _mapper);
        var command = new EditTagQuery
        {
            TagId = new Guid("a3446f5d-5e34-4ae9-aef9-fe0b584bb9cd")
        };

        var result = await handler.Handle(
            command,
            CancellationToken.None
        );

        result.ShouldBeOfType<EditTagModel>();
        result.Name.ShouldBe("tag1");
    }
}